<% layout('/layouts/default.html', {title: 'rt_device_bohao管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
<!--			<div class="box-title">-->
<!--				<i class="fa icon-notebook"></i> ${text('rt_device_bohao管理')}-->
<!--			</div>-->
<!--			<div class="box-tools pull-right">-->
<!--				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>-->
<!--				<% if(hasPermi('rt:rtDeviceBohao:edit')){ %>-->
<!--					<a href="${ctx}/rt/rtDeviceBohao/form" class="btn btn-default btnTool" title="${text('新增rt_device_bohao')}"><i class="fa fa-plus"></i> ${text('新增')}</a>-->
<!--				<% } %>-->
<!--				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>-->
<!--			</div>-->
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${rtDeviceBohao}" action="${ctx}/rt/rtDeviceBohao/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('vlanId')}：</label>
					<div class="control-inline">
						<#form:input path="sn" maxlength="255" class="form-control width-120"/>
					</div>
				</div>

				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text("vlanId")}', name:'vlanId', index:'a.vlan_id', width:150, align:"left", frozen:true},
		{header:'${text("拨号账号")}', name:'vlanAccount', index:'a.vlan_account', width:150, align:"left"},
		{header:'${text("拨号密码")}', name:'vlanPassword', index:'a.vlan_password', width:150, align:"left"},
		{header:'${text("IP")}', name:'vlanIp', index:'a.vlan_ip', width:150, align:"left"},
		{header:'${text("vlanName")}', name:'vlanName', index:'a.vlan_name', width:150, align:"left"},
		{header:'${text("网关")}', name:'gateway', index:'a.gateway', width:150, align:"left"},
		{header:'${text("网卡")}', name:'nicmac', index:'a.nicmac', width:150, align:"left"},
		{header:'${text("网卡名称")}', name:'ifName', index:'a.if_name', width:150, align:"left"},
		{header:'${text("网卡速率")}', name:'speed', index:'a.speed', width:150, align:"left"},
		{header:'${text("线路实时状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('rt_bohao_line_state')}, val, '${text("未知")}', true);
		}},
		{header:'${text("是否ipv6")}', name:'isIpv6', index:'a.is_ipv6', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('rt_is_ipv6')}, val, '${text("未知")}', true);
		}},
		{header:'${text("拨号错误码")}', name:'dialCode', index:'a.dial_code', width:150, align:"left"},
		{header:'${text("拨号错误信息")}', name:'dialMsg', index:'a.dial_msg', width:150, align:"left"},
		// {header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
		// 	var actions = [];
		// 	//<% if(hasPermi('rt:rtDeviceBohao:edit')){ %>
		// 		actions.push('<a href="${ctx}/rt/rtDeviceBohao/form?id='+row.id+'" class="btnList" title="${text("编辑rt_device_bohao")}"><i class="fa fa-pencil"></i></a>&nbsp;');
		// 		actions.push('<a href="${ctx}/rt/rtDeviceBohao/delete?id='+row.id+'" class="btnList" title="${text("删除rt_device_bohao")}" data-confirm="${text("确认要删除该rt_device_bohao吗？")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
		// 	//<% } %>
		// 	return actions.join('');
		// }}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>